using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace APNotifications.Controls
{
    public partial class About : UserControl
    {

        public string downloadUrl { get; set; }

        public About()
        {
            InitializeComponent();           
        }  

        private void About_Load(object sender, EventArgs e)
        {
            BindControls();
        }

        private void BindControls()
        {
            if (downloadUrl == string.Empty)
            {
                lnkDownload.Visible = false;
            }
            
            lblVersion.Text = Config.Version().ToString();
        }

        private void lnkDownload_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                System.Diagnostics.Process.Start(downloadUrl);
            }
            catch
            {
            }
        }
    }
}
